
using System;
using DG.Tweening;
using UnityEngine.UI;

public class PanelLoading : PanelBase
{
    public Slider m_slider;
    
    protected override void Init()
    {
        base.Init();
        m_PanelType = EPanelType.Front;
    }

    public override void OpenPanel(Action pAction)
    {
        gameObject.SetActive(true);
        DOTween.To(() => m_slider.value, x => m_slider.value = x, 1,
            5).OnComplete(() => { pAction(); });
    }
}
